<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-商品列表">
</@frame.head>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/search_table.css" />
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span>财务管理 <span class="c-gray en">&gt;</span> 退换货商品结算管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
<form method="post" name="query_nanhang_form"  id="query_nanhang_form" action="${contextPath}/nanhang/nanhang_return_goods_list" >    
    <input type="hidden" name="page" value="${pagination.pageNo}"  id="page" />                          
    <div class="text-c">
        <table class="table search_table">
		  <tr>  
           <td>订单编号：</td>
           <td>
             <input type="text" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();" class="input-text  radius" placeholder="订单编号" id="orderNo" name="orderNo" value="${(exchangeQo.orderNo?c)!}" >
           </td>
		   <td>退换货状态：</td>
           <td>
			<span class="select-box radius">  
                <select class="select" name="exchangeStatus" id="exchangeStatus">
                  <#if excheMapStatus??>
			  	  <#list excheMapStatus?keys as key>
			      <option <#if exchangeQo.exchangeStatus==key > selected="selected"</#if>  value="${key}">${excheMapStatus[key]}</option>
			 	  </#list>
			 	  </#if>	
				</select>
			  </span>      
            </td>
            <td>申请时间：</td>
            <td> 
	          	<input onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'exchangeDateEndTime\')||\'%y-%M-%d\'}',readOnly: true })" 
	            id="exchangeDateStartTime" name="exchangeDateStartTime" value="<#if exchangeQo.exchangeDateStartTime?? >${exchangeQo.exchangeDateStartTime?date}</#if>" 
	           	class="input-text Wdate" style="width:45%;" readonly="" type="text">
                                         至  
               <input onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'exchangeDateStartTime\')}',maxDate:'%y-%M-%d',readOnly: true })"
               id="exchangeDateEndTime"   name="exchangeDateEndTime" value="<#if exchangeQo.exchangeDateEndTime?? >${exchangeQo.exchangeDateEndTime?date}</#if>" 
               class="input-text Wdate" style="width:45%;" type="text">
             </td>
		  </tr>
          <tr>
           <td>申请人：</td>
           <td>
             <input type="text" class="input-text  radius" placeholder="申请人" id="exchanger" name="exchanger" value="${exchangeQo.exchanger}" >
           </td>
           <td></td>
           <td colspan="3">
             <input class="btn btn-success radius" type="button" onclick="search();" value="查询"/>
             <input class="btn btn-success radius" type="button" onclick="excelAll();" value="导出"/>
           </td>
         </tr>
      </table>
    </div>
</form>
    <div class="cl pd-5 bg-1 bk-gray mt-20"> 
    <span class="r">共有数据：<strong> ${pagination.totalCount} </strong> 条</span> </div>
    <table class="table table-border table-bordered table-bg" style="margin-top: -1px;">
        <thead>
        
        <tr   class="text-c">
            <!-- <th width="45px">
            <input  type="checkbox" id="selectAll" disabled="disabled" onclick="checkAll()"/>
            </th> -->
            <th  > 退换货单号</th>
            <th >订单编号</th>
            <th >申请人姓名</th>
            <th >商品名称</th>
            <th  > 申请时间</th>
            <th  > 退换状态</th>
              <th width="50" >操作</th>
        </tr>
        </thead>
        <tbody>
       <#if pagination.list?? && (pagination.list?size &gt; 0) >
        <#list pagination.list as exchange> 
        	 <tr>
        	   	<td >${exchange.id}  </td>
        	   	<td >  
        	   	${exchange.order.id}
        	   </td>
 				<td>   ${exchange.exchanger }  </td>
 				
 				 <td>  	 ${exchange.prodName }
 				 </td>
                 				 <td>  	${(exchange.exchangeDate?string("yyyy-MM-dd HH:mm:ss"))!}
 				 </td>
	 			<td>

               <#if exchange.exchangeStatus??>
      		  			<#if excheMapStatus[exchange.exchangeStatus?c]??>
					     ${excheMapStatus[exchange.exchangeStatus?c]}
				</#if>
			</#if>
	 				
	 			</td>
 			 	<td>
 			 	 <a href="javascript:;" onclick="dio_result(${exchange.order.id},${exchange.id})"  ><font color="blue">查看详情</font></a>
 			 	</td>
        	 </tr>
      </#list></#if>
     </tbody>
    </table>
    <div id="biuuu_city" style="padding-top: 10px;float: right"></div>
</div>
<@frame.end "default">
</@frame.end>

<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/order/search_order_list.js"></script>
<script type="text/javascript">
var path="${contextPath}";
laypage({
    cont: 'biuuu_city',//容器。值支持id名、原生dom对象，jquery对象。
    pages: ${pagination.totalPage},//通过后台拿到的总页数
    curr:  ${pagination.pageNo} || 1, //当前页
    skip: true, //是否开启跳页
	first: 1, //将首页显示为数字1,。若不显示，设置false即可
	last: ${pagination.totalPage}, //将尾页显示为总页数。若不显示，设置false即可
    jump: function(obj , first){//触发分页后的回调
        if(!first){ //点击跳页触发函数;当前页为obj.curr
          $(page).val(obj.curr);//获取点击的页码
          $(query_nanhang_form).submit();
        }
    }
})  
function search(){
    $("#page").val("1");
    $("#query_nanhang_form").attr("action",path+"/nanhang/nanhang_return_goods_list").submit();
}	

function excelAll(){
	$("#query_nanhang_form").attr("action",path+"/nanhang/nanhang_tuiHuo_excel").submit();
}	
/* --------------查看详情 ---------------*/
function dio_result(no,id){

	   var index = layer.open({
		    type: 2,
		    title: '查看详情',
		    maxmin: true,
		    scrollbar: false,
		    content: path+"/exchange/query_exchange_detil?id="+id+"&orderNo="+no,
		    area: ['860px', '680px']
		    });
	 
}
</script>
</body>

</html>
 
